<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数据统计 - 喝水小管家</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            background-color: #f8fafc;
        }
        .status-bar {
            background-color: #000;
            color: white;
            padding: 5px 15px;
            display: flex;
            justify-content: space-between;
            font-size: 12px;
        }
        .nav-bar {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: white;
            border-top: 1px solid #e2e8f0;
            display: flex;
            justify-content: space-around;
            padding: 10px 0;
            box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        }
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: #64748b;
            font-size: 10px;
        }
        .nav-item.active {
            color: #3b82f6;
        }
        .nav-icon {
            font-size: 22px;
            margin-bottom: 3px;
        }
        .tab-btn {
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 14px;
            transition: all 0.2s;
        }
        .tab-btn.active {
            background-color: #3b82f6;
            color: white;
        }
        .chart-bar {
            width: 30px;
            border-radius: 4px;
            background-color: #93c5fd;
            margin: 0 auto;
            transition: height 0.3s;
        }
        .chart-bar.active {
            background-color: #3b82f6;
        }
        .chart-label {
            font-size: 10px;
            margin-top: 5px;
            color: #64748b;
        }
        .achievement-card {
            border-radius: 16px;
            background: linear-gradient(145deg, #42a1ec, #0070c9);
            color: white;
            overflow: hidden;
            position: relative;
        }
        .achievement-icon {
            position: absolute;
            right: -20px;
            bottom: -20px;
            font-size: 100px;
            opacity: 0.1;
        }
        .habit-bar {
            height: 6px;
            background-color: #e2e8f0;
            border-radius: 3px;
            overflow: hidden;
        }
        .habit-progress {
            height: 100%;
            background-color: #3b82f6;
            border-radius: 3px;
        }
    </style>
</head>
<body>
    <!-- 状态栏 -->
    <div class="status-bar">
        <span>9:41</span>
        <div>
            <span class="mr-1"><i class="fas fa-signal"></i></span>
            <span class="mr-1"><i class="fas fa-wifi"></i></span>
            <span><i class="fas fa-battery-full"></i></span>
        </div>
    </div>

    <!-- 内容区域 -->
    <div class="px-4 pt-3 pb-20">
        <!-- 顶部标题 -->
        <div class="flex justify-between items-center py-2">
            <h1 class="text-xl font-bold text-gray-800">数据统计</h1>
            <button class="text-gray-400"><i class="fas fa-share-alt"></i></button>
        </div>
        
        <!-- 时间范围选择 -->
        <div class="flex space-x-2 mt-3 overflow-x-auto pb-2">
            <button class="tab-btn active">日</button>
            <button class="tab-btn">周</button>
            <button class="tab-btn">月</button>
            <button class="tab-btn">年</button>
        </div>
        
        <!-- 总览卡片 -->
        <div class="bg-white rounded-2xl shadow-sm p-5 mt-4">
            <div class="grid grid-cols-3 gap-3">
                <div class="text-center">
                    <div class="text-3xl font-bold text-blue-500">1.4L</div>
                    <div class="text-xs text-gray-500 mt-1">今日饮水量</div>
                </div>
                <div class="text-center border-l border-r border-gray-100">
                    <div class="text-3xl font-bold text-gray-800">70%</div>
                    <div class="text-xs text-gray-500 mt-1">完成率</div>
                </div>
                <div class="text-center">
                    <div class="text-3xl font-bold text-gray-800">7</div>
                    <div class="text-xs text-gray-500 mt-1">饮水次数</div>
                </div>
            </div>
        </div>
        
        <!-- 图表区域 -->
        <div class="bg-white rounded-2xl shadow-sm p-5 mt-4">
            <div class="flex justify-between items-center mb-4">
                <h3 class="font-semibold text-gray-800">饮水趋势</h3>
                <span class="text-sm text-blue-500">查看详情</span>
            </div>
            
            <!-- 柱状图 -->
            <div class="flex items-end justify-between h-40 mb-3">
                <div class="flex flex-col items-center">
                    <div class="chart-bar active" style="height: 60%;"></div>
                    <div class="chart-label">一</div>
                </div>
                <div class="flex flex-col items-center">
                    <div class="chart-bar" style="height: 40%;"></div>
                    <div class="chart-label">二</div>
                </div>
                <div class="flex flex-col items-center">
                    <div class="chart-bar" style="height: 75%;"></div>
                    <div class="chart-label">三</div>
                </div>
                <div class="flex flex-col items-center">
                    <div class="chart-bar" style="height: 90%;"></div>
                    <div class="chart-label">四</div>
                </div>
                <div class="flex flex-col items-center">
                    <div class="chart-bar" style="height: 55%;"></div>
                    <div class="chart-label">五</div>
                </div>
                <div class="flex flex-col items-center">
                    <div class="chart-bar" style="height: 85%;"></div>
                    <div class="chart-label">六</div>
                </div>
                <div class="flex flex-col items-center">
                    <div class="chart-bar" style="height: 70%;"></div>
                    <div class="chart-label">日</div>
                </div>
            </div>
            
            <!-- 图例 -->
            <div class="flex justify-center space-x-6 mt-3">
                <div class="flex items-center">
                    <div class="w-3 h-3 rounded-full bg-blue-500 mr-1"></div>
                    <span class="text-xs text-gray-600">实际饮水量</span>
                </div>
                <div class="flex items-center">
                    <div class="w-3 h-3 rounded-full bg-gray-300 mr-1"></div>
                    <span class="text-xs text-gray-600">目标量</span>
                </div>
            </div>
        </div>
        
        <!-- 饮水类型分析 -->
        <div class="bg-white rounded-2xl shadow-sm p-5 mt-4">
            <div class="flex justify-between items-center mb-4">
                <h3 class="font-semibold text-gray-800">饮水类型分析</h3>
                <span class="text-sm text-blue-500">更多</span>
            </div>
            
            <!-- 饼图(模拟) -->
            <div class="flex">
                <div class="w-1/3">
                    <div class="relative w-24 h-24 mx-auto">
                        <!-- 简化饼图显示 -->
                        <svg viewBox="0 0 36 36" class="w-full h-full">
                            <path d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831" fill="none" stroke="#e2e8f0" stroke-width="3" />
                            <path d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831" fill="none" stroke="#3b82f6" stroke-width="3" stroke-dasharray="70, 100" />
                        </svg>
                        <div class="absolute inset-0 flex items-center justify-center">
                            <span class="text-lg font-bold text-gray-800">70%</span>
                        </div>
                    </div>
                </div>
                
                <div class="w-2/3 space-y-2">
                    <div>
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700 flex items-center">
                                <span class="inline-block w-3 h-3 rounded-full bg-blue-500 mr-2"></span>
                                白水
                            </span>
                            <span class="text-gray-700">70%</span>
                        </div>
                        <div class="habit-bar">
                            <div class="habit-progress" style="width: 70%;"></div>
                        </div>
                    </div>
                    <div>
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700 flex items-center">
                                <span class="inline-block w-3 h-3 rounded-full bg-green-500 mr-2"></span>
                                茶水
                            </span>
                            <span class="text-gray-700">15%</span>
                        </div>
                        <div class="habit-bar">
                            <div class="habit-progress bg-green-500" style="width: 15%;"></div>
                        </div>
                    </div>
                    <div>
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700 flex items-center">
                                <span class="inline-block w-3 h-3 rounded-full bg-yellow-500 mr-2"></span>
                                咖啡
                            </span>
                            <span class="text-gray-700">10%</span>
                        </div>
                        <div class="habit-bar">
                            <div class="habit-progress bg-yellow-500" style="width: 10%;"></div>
                        </div>
                    </div>
                    <div>
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700 flex items-center">
                                <span class="inline-block w-3 h-3 rounded-full bg-red-400 mr-2"></span>
                                果汁
                            </span>
                            <span class="text-gray-700">5%</span>
                        </div>
                        <div class="habit-bar">
                            <div class="habit-progress bg-red-400" style="width: 5%;"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 成就卡片 -->
        <div class="mt-4 achievement-card p-5">
            <div class="flex justify-between">
                <div>
                    <h3 class="font-semibold text-lg">连续饮水达标</h3>
                    <p class="text-sm text-blue-100 mt-1">你已经连续7天达到饮水目标</p>
                    <button class="mt-4 bg-white text-blue-500 px-4 py-2 rounded-lg text-sm font-medium">查看详情</button>
                </div>
                <div class="relative">
                    <i class="fas fa-trophy text-4xl"></i>
                </div>
            </div>
            <i class="fas fa-award achievement-icon"></i>
        </div>
    </div>
    
    <!-- 底部导航 -->
    <div class="nav-bar">
        <div class="nav-item">
            <div class="nav-icon"><i class="fas fa-home"></i></div>
            <span>首页</span>
        </div>
        <div class="nav-item">
            <div class="nav-icon"><i class="fas fa-list"></i></div>
            <span>记录</span>
        </div>
        <div class="nav-item active">
            <div class="nav-icon"><i class="fas fa-chart-bar"></i></div>
            <span>统计</span>
        </div>
        <div class="nav-item">
            <div class="nav-icon"><i class="fas fa-user"></i></div>
            <span>我的</span>
        </div>
    </div>
</body>
</html> 